package com.aizuda.boot.modules.business.counterparty.entity.vo;


import com.aizuda.boot.modules.business.counterparty.entity.dto.BankInfoDTO;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

@Data
@Schema(description = "法人实体分页响应")
public class LegalEntityPageRespDTO {
    
    @Schema(description = "总记录数")
    private Long total;
    
    @Schema(description = "当前页码")
    private Integer pageNum;
    
    @Schema(description = "每页条数")
    private Integer pageSize;
    
    @Schema(description = "总页数")
    private Integer totalPages;
    
    @Schema(description = "法人实体列表")
    private List<LegalEntityItemDTO> items;
    
    @Data
    @Schema(description = "法人实体列表项")
    public static class LegalEntityItemDTO {
        
        @Schema(description = "主键ID")
        private Integer id;
        
        @Schema(description = "法人实体编码")
        private String legalEntityCode;
        
        @Schema(description = "法人实体名称")
        private String legalEntityName;
        
        @Schema(description = "法人实体简称")
        private String legalEntityAbbr;
        
        @Schema(description = "注册国家/地区")
        private String registerCountry;

        @Schema(description = "注册国家/地区名称")
        private String registerCountryName;
        
        @Schema(description = "详细地址")
        private String detailAddress;
        
        @Schema(description = "证件类型")
        private Integer certificateType;

        @Schema(description = "证件类型描述")
        private String certificateTypeDesc;
        
        @Schema(description = "证件ID")
        private String certificateId;

        @Schema(description = "纳税人类型")
        private String taxpayer;

        @Schema(description = "纳税人类型描述")
        private String taxpayerDesc;
        
        @Schema(description = "是否启用(0:停用,1:启用)")
        private Boolean isEnabled;
        
        @Schema(description = "启用状态文本")
        private String statusText;
        
        @Schema(description = "银行账户数量")
        private Integer bankAccountCount;
        
        @Schema(description = "银行账户列表")
        private List<BankInfoDTO> bankInfoList;

        @Schema(description = "创建appid")
        private String createAppid;

        @Schema(description = "创建来源")
        private String createSource;

        @Schema(description = "修改appid")
        private String updateAppid;

        @Schema(description = "修改来源")
        private String updateSource;

        @Schema(description = "创建人ID")
        private Long createId;

        @Schema(description = "创建人")
        private String createBy;

        @Schema(description = "创建时间")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        private LocalDateTime createdAt;

        @Schema(description = "更新人")
        private String updateBy;

        @Schema(description = "更新时间")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        private LocalDateTime updatedAt;

        @Schema(description = "附件列表")
        private List<FileInfoDTO> attachments;

        @Schema(description = "系统租户")
        private List<String> sysTenantKey;

        @Schema(description = "租户名称")
        private String tenantName;
    }

    @Data
    public static class FileInfoDTO {

        @Schema(description = "文件ID")
        private Long fileId;

        @Schema(description = "文件名")
        private String fileName;

        @Schema(description = "文件类型")
        private String fileType;

        @Schema(description = "文件Key")
        private String fileKey;

        @Schema(description = "文件大小(单位byte)")
        private Long fileSize;
    }

} 